package com.showsu.editor.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: William
 * @Description: 用户会员权益，次数项目
 * @Date: Created in 2:37 下午 2024/9/14
 * @Modified By:
 */
@Getter
@AllArgsConstructor
public enum UserPrivilegeEnum {

    XHSLIVE("xhslive","xhs live作品去水印"),
    PHOTOVIDEO("photovideo","图片/视频去水印"),
    GIFPHOTO("gifphoto","GIF动图去水印"),
    COMMENTPHOTO("commentphoto","评论图片去水印"),
    AI_CHECKTEXT("ai_checktext","笔记AI违禁词检测"),
    XHSCOMMENTSLIVE("xhsCommentslive","xhs评论区live去水印"),
    XHS_AWEME_INCLUDED("xhsAwemeIncluded","xhs笔记收录查询"),
    XHS_AWEME_RANK("xhsAwemeRank","xhs笔记排名查询"),
    ;

    /**
     * code
     */
    final String code;

    /**
     * 描述
     */
    final String msg;

    public static UserPrivilegeEnum getByCode(String code){
        if (code == null) {
            return null;
        }
        for (UserPrivilegeEnum iEnum : UserPrivilegeEnum.values()) {
            if (iEnum.getCode().equals(code)) {
                return iEnum;
            }
        }
        return null;
    }


}
